package com.example.router;

import androidx.annotation.Nullable;

import java.util.ArrayList;
import java.util.HashMap;

public class ActivityCategory {

    private String category;
    private HashMap<String,RouterActivityInfo> activityInfoHashMap = new HashMap<>();

    public ActivityCategory() {
    }

    public ActivityCategory(String category) {
        this.category = category;
    }

    public ActivityCategory(String category, HashMap<String, RouterActivityInfo> activityInfoHashMap) {
        this.category = category;
        this.activityInfoHashMap = activityInfoHashMap;
    }

    public void put(String key, RouterActivityInfo info) {
        activityInfoHashMap.put(key,info);
    }

    @Nullable
    public RouterActivityInfo get(String key) {
        return activityInfoHashMap.get(key);
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public ArrayList<RouterActivityInfo> getAllRouterActivityInfo() {
        return new ArrayList<>(activityInfoHashMap.values());
    }
}
